#include "WinMain.h"		// standard application include
#include "Oatmeal.h"		// include for oatmeal engine

///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////// MAIN APPLICATION LOGIC //////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

/*/
/ / int WINAPI
/ /		WinMain (HINSTANCE, HINSTANCE, LPSTR, int)
/ /
/ / PURPOSE:
/ /		Entry point for the application.
/ /
/ / COMMENTS:
/ /		This function initializes the application and processes the window.
/*/

int WINAPI
WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
	int nReturn = 0;
	size sc = {800, 600};

	oatInitEngineWindowed("Oatmeal, Inc.", "Oatmeal Test App", false, true, false);
	if(oatCreateMainWindow(&sc, NULL, false, false))
	{
		// set default states and show main window
		oatSetMainWindowIcon(IDR_MAINFRAME);
		oatShowMainWindow(true);

		// main engine loop
		while(oatIsEngineRunning());

		// all went well
		nReturn = 1;
	}

	// terminate the application
	return nReturn;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////